Dart.PowerTCP.SslSockets Namespace > SegmentedStream Class > Read Method : Read(Byte[],ArrayList,Int32,Int32,Boolean) Method |
Read data from the stream until one of the specified delimiters is found.
[Visual Basic]
Overloads Public Function Read( _
ByVal buffer() As Byte, _
ByVal delimiters As ArrayList, _
ByVal offset As Integer, _
ByVal count As Integer, _
ByRef found As Boolean _
) As Integer
[C++]
public: int Read(
byte[]* buffer,
ArrayList* delimiters,
int offset,
int count,
ref bool found
)
[C++/CLI]
public:
int Read(
bytearray<buffer>^ buffer,
ArrayList^ delimiters,
int offset,
int count,
% bool found
)
The total number of bytes read into the buffer, which will normally be less than count. Returns 0 if end of stream is reached and there is no data left to return.
Exception | Description |
---|---|
IOException | Thrown when the stream is not readable. |
ArgumentNullException | Thrown when the receiving buffer is null. |
ArgumentOutOfRangeException | Thrown when the offset is less than zero or when count is less than or equal to zero. |
ArgumentException | Thrown when (offset + count) > buffer.Length. |
EndOfStreamException | At least one byte was read without finding a delimiter before end of stream was reached. |
This method reads from the stream and returns when one of the provided delimiters is found, count bytes have been read, or end of stream is reached.
The purpose of this method is to provide a convenient way to read a variable-length record from the stream. The delimiters list must consist of byte arrays.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
SegmentedStream Class | SegmentedStream Members | Overload List
Send comments on this topic.
Documentation version 1.1.2.0.
© 2008 Dart Communications. All rights reserved.